\(\int \frac {a+b x^2}{x^5 \sqrt {-1+c x} \sqrt {1+c x}} \, dx\) [357]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (warning: unable to verify)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F(-1)]
   Maxima [A] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 29, antiderivative size = 99 \[ \int \frac {a+b x^2}{x^5 \sqrt {-1+c x} \sqrt {1+c x}} \, dx=\frac {a \sqrt {-1+c x} \sqrt {1+c x}}{4 x^4}+\frac {\left (4 b+3 a c^2\right ) \sqrt {-1+c x} \sqrt {1+c x}}{8 x^2}+\frac {1}{8} c^2 \left (4 b+3 a c^2\right ) \arctan \left (\sqrt {-1+c x} \sqrt {1+c x}\right ) \]

[Out]

1/8*c^2*(3*a*c^2+4*b)*arctan((c*x-1)^(1/2)*(c*x+1)^(1/2))+1/4*a*(c*x-1)^(1/2)*(c*x+1)^(1/2)/x^4+1/8*(3*a*c^2+4
*b)*(c*x-1)^(1/2)*(c*x+1)^(1/2)/x^2

Rubi [A] (verified)

Time = 0.05 (sec) , antiderivative size = 99, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.172, Rules used = {465, 105, 12, 94, 211} \[ \int \frac {a+b x^2}{x^5 \sqrt {-1+c x} \sqrt {1+c x}} \, dx=\frac {1}{8} c^2 \left (3 a c^2+4 b\right ) \arctan \left (\sqrt {c x-1} \sqrt {c x+1}\right )+\frac {\sqrt {c x-1} \sqrt {c x+1} \left (3 a c^2+4 b\right )}{8 x^2}+\frac {a \sqrt {c x-1} \sqrt {c x+1}}{4 x^4} \]

[In]

Int[(a + b*x^2)/(x^5*Sqrt[-1 + c*x]*Sqrt[1 + c*x]),x]

[Out]

(a*Sqrt[-1 + c*x]*Sqrt[1 + c*x])/(4*x^4) + ((4*b + 3*a*c^2)*Sqrt[-1 + c*x]*Sqrt[1 + c*x])/(8*x^2) + (c^2*(4*b
+ 3*a*c^2)*ArcTan[Sqrt[-1 + c*x]*Sqrt[1 + c*x]])/8

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 94

Int[1/(Sqrt[(a_.) + (b_.)*(x_)]*Sqrt[(c_.) + (d_.)*(x_)]*((e_.) + (f_.)*(x_))), x_Symbol] :> Dist[b*f, Subst[I
nt[1/(d*(b*e - a*f)^2 + b*f^2*x^2), x], x, Sqrt[a + b*x]*Sqrt[c + d*x]], x] /; FreeQ[{a, b, c, d, e, f}, x] &&
 EqQ[2*b*d*e - f*(b*c + a*d), 0]

Rule 105

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Simp[b*(a +
b*x)^(m + 1)*(c + d*x)^(n + 1)*((e + f*x)^(p + 1)/((m + 1)*(b*c - a*d)*(b*e - a*f))), x] + Dist[1/((m + 1)*(b*
c - a*d)*(b*e - a*f)), Int[(a + b*x)^(m + 1)*(c + d*x)^n*(e + f*x)^p*Simp[a*d*f*(m + 1) - b*(d*e*(m + n + 2) +
 c*f*(m + p + 2)) - b*d*f*(m + n + p + 3)*x, x], x], x] /; FreeQ[{a, b, c, d, e, f, n, p}, x] && ILtQ[m, -1] &
& (IntegerQ[n] || IntegersQ[2*n, 2*p] || ILtQ[m + n + p + 3, 0])

Rule 211

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/Rt[a/b, 2]], x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 465

Int[((e_.)*(x_))^(m_.)*((a1_) + (b1_.)*(x_)^(non2_.))^(p_.)*((a2_) + (b2_.)*(x_)^(non2_.))^(p_.)*((c_) + (d_.)
*(x_)^(n_)), x_Symbol] :> Simp[c*(e*x)^(m + 1)*(a1 + b1*x^(n/2))^(p + 1)*((a2 + b2*x^(n/2))^(p + 1)/(a1*a2*e*(
m + 1))), x] + Dist[(a1*a2*d*(m + 1) - b1*b2*c*(m + n*(p + 1) + 1))/(a1*a2*e^n*(m + 1)), Int[(e*x)^(m + n)*(a1
 + b1*x^(n/2))^p*(a2 + b2*x^(n/2))^p, x], x] /; FreeQ[{a1, b1, a2, b2, c, d, e, p}, x] && EqQ[non2, n/2] && Eq
Q[a2*b1 + a1*b2, 0] && (IntegerQ[n] || GtQ[e, 0]) && ((GtQ[n, 0] && LtQ[m, -1]) || (LtQ[n, 0] && GtQ[m + n, -1
])) &&  !ILtQ[p, -1]

Rubi steps \begin{align*} \text {integral}& = \frac {a \sqrt {-1+c x} \sqrt {1+c x}}{4 x^4}+\frac {1}{4} \left (4 b+3 a c^2\right ) \int \frac {1}{x^3 \sqrt {-1+c x} \sqrt {1+c x}} \, dx \\ & = \frac {a \sqrt {-1+c x} \sqrt {1+c x}}{4 x^4}+\frac {\left (4 b+3 a c^2\right ) \sqrt {-1+c x} \sqrt {1+c x}}{8 x^2}+\frac {1}{8} \left (4 b+3 a c^2\right ) \int \frac {c^2}{x \sqrt {-1+c x} \sqrt {1+c x}} \, dx \\ & = \frac {a \sqrt {-1+c x} \sqrt {1+c x}}{4 x^4}+\frac {\left (4 b+3 a c^2\right ) \sqrt {-1+c x} \sqrt {1+c x}}{8 x^2}+\frac {1}{8} \left (c^2 \left (4 b+3 a c^2\right )\right ) \int \frac {1}{x \sqrt {-1+c x} \sqrt {1+c x}} \, dx \\ & = \frac {a \sqrt {-1+c x} \sqrt {1+c x}}{4 x^4}+\frac {\left (4 b+3 a c^2\right ) \sqrt {-1+c x} \sqrt {1+c x}}{8 x^2}+\frac {1}{8} \left (c^3 \left (4 b+3 a c^2\right )\right ) \text {Subst}\left (\int \frac {1}{c+c x^2} \, dx,x,\sqrt {-1+c x} \sqrt {1+c x}\right ) \\ & = \frac {a \sqrt {-1+c x} \sqrt {1+c x}}{4 x^4}+\frac {\left (4 b+3 a c^2\right ) \sqrt {-1+c x} \sqrt {1+c x}}{8 x^2}+\frac {1}{8} c^2 \left (4 b+3 a c^2\right ) \tan ^{-1}\left (\sqrt {-1+c x} \sqrt {1+c x}\right ) \\ \end{align*}

Mathematica [A] (warning: unable to verify)

Time = 0.29 (sec) , antiderivative size = 78, normalized size of antiderivative = 0.79 \[ \int \frac {a+b x^2}{x^5 \sqrt {-1+c x} \sqrt {1+c x}} \, dx=\frac {1}{8} \left (\frac {\sqrt {-1+c x} \sqrt {1+c x} \left (4 b x^2+a \left (2+3 c^2 x^2\right )\right )}{x^4}+\left (8 b c^2+6 a c^4\right ) \arctan \left (\sqrt {\frac {-1+c x}{1+c x}}\right )\right ) \]

[In]

Integrate[(a + b*x^2)/(x^5*Sqrt[-1 + c*x]*Sqrt[1 + c*x]),x]

[Out]

((Sqrt[-1 + c*x]*Sqrt[1 + c*x]*(4*b*x^2 + a*(2 + 3*c^2*x^2)))/x^4 + (8*b*c^2 + 6*a*c^4)*ArcTan[Sqrt[(-1 + c*x)
/(1 + c*x)]])/8

Maple [A] (verified)

Time = 4.05 (sec) , antiderivative size = 94, normalized size of antiderivative = 0.95

method result size
risch \(\frac {\sqrt {c x -1}\, \sqrt {c x +1}\, \left (3 a \,c^{2} x^{2}+4 b \,x^{2}+2 a \right )}{8 x^{4}}-\frac {c^{2} \left (3 c^{2} a +4 b \right ) \arctan \left (\frac {1}{\sqrt {c^{2} x^{2}-1}}\right ) \sqrt {\left (c x -1\right ) \left (c x +1\right )}}{8 \sqrt {c x -1}\, \sqrt {c x +1}}\) \(94\)
default \(-\frac {\sqrt {c x -1}\, \sqrt {c x +1}\, \left (3 \arctan \left (\frac {1}{\sqrt {c^{2} x^{2}-1}}\right ) a \,c^{4} x^{4}+4 \arctan \left (\frac {1}{\sqrt {c^{2} x^{2}-1}}\right ) b \,c^{2} x^{4}-3 \sqrt {c^{2} x^{2}-1}\, a \,c^{2} x^{2}-4 \sqrt {c^{2} x^{2}-1}\, b \,x^{2}-2 \sqrt {c^{2} x^{2}-1}\, a \right )}{8 \sqrt {c^{2} x^{2}-1}\, x^{4}}\) \(125\)

[In]

int((b*x^2+a)/x^5/(c*x-1)^(1/2)/(c*x+1)^(1/2),x,method=_RETURNVERBOSE)

[Out]

1/8*(c*x-1)^(1/2)*(c*x+1)^(1/2)*(3*a*c^2*x^2+4*b*x^2+2*a)/x^4-1/8*c^2*(3*a*c^2+4*b)*arctan(1/(c^2*x^2-1)^(1/2)
)*((c*x-1)*(c*x+1))^(1/2)/(c*x-1)^(1/2)/(c*x+1)^(1/2)

Fricas [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 78, normalized size of antiderivative = 0.79 \[ \int \frac {a+b x^2}{x^5 \sqrt {-1+c x} \sqrt {1+c x}} \, dx=\frac {2 \, {\left (3 \, a c^{4} + 4 \, b c^{2}\right )} x^{4} \arctan \left (-c x + \sqrt {c x + 1} \sqrt {c x - 1}\right ) + {\left ({\left (3 \, a c^{2} + 4 \, b\right )} x^{2} + 2 \, a\right )} \sqrt {c x + 1} \sqrt {c x - 1}}{8 \, x^{4}} \]

[In]

integrate((b*x^2+a)/x^5/(c*x-1)^(1/2)/(c*x+1)^(1/2),x, algorithm="fricas")

[Out]

1/8*(2*(3*a*c^4 + 4*b*c^2)*x^4*arctan(-c*x + sqrt(c*x + 1)*sqrt(c*x - 1)) + ((3*a*c^2 + 4*b)*x^2 + 2*a)*sqrt(c
*x + 1)*sqrt(c*x - 1))/x^4

Sympy [F(-1)]

Timed out. \[ \int \frac {a+b x^2}{x^5 \sqrt {-1+c x} \sqrt {1+c x}} \, dx=\text {Timed out} \]

[In]

integrate((b*x**2+a)/x**5/(c*x-1)**(1/2)/(c*x+1)**(1/2),x)

[Out]

Timed out

Maxima [A] (verification not implemented)

none

Time = 0.37 (sec) , antiderivative size = 85, normalized size of antiderivative = 0.86 \[ \int \frac {a+b x^2}{x^5 \sqrt {-1+c x} \sqrt {1+c x}} \, dx=-\frac {3}{8} \, a c^{4} \arcsin \left (\frac {1}{c {\left | x \right |}}\right ) - \frac {1}{2} \, b c^{2} \arcsin \left (\frac {1}{c {\left | x \right |}}\right ) + \frac {3 \, \sqrt {c^{2} x^{2} - 1} a c^{2}}{8 \, x^{2}} + \frac {\sqrt {c^{2} x^{2} - 1} b}{2 \, x^{2}} + \frac {\sqrt {c^{2} x^{2} - 1} a}{4 \, x^{4}} \]

[In]

integrate((b*x^2+a)/x^5/(c*x-1)^(1/2)/(c*x+1)^(1/2),x, algorithm="maxima")

[Out]

-3/8*a*c^4*arcsin(1/(c*abs(x))) - 1/2*b*c^2*arcsin(1/(c*abs(x))) + 3/8*sqrt(c^2*x^2 - 1)*a*c^2/x^2 + 1/2*sqrt(
c^2*x^2 - 1)*b/x^2 + 1/4*sqrt(c^2*x^2 - 1)*a/x^4

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 268 vs. \(2 (81) = 162\).

Time = 0.29 (sec) , antiderivative size = 268, normalized size of antiderivative = 2.71 \[ \int \frac {a+b x^2}{x^5 \sqrt {-1+c x} \sqrt {1+c x}} \, dx=-\frac {{\left (3 \, a c^{5} + 4 \, b c^{3}\right )} \arctan \left (\frac {1}{2} \, {\left (\sqrt {c x + 1} - \sqrt {c x - 1}\right )}^{2}\right ) + \frac {2 \, {\left (3 \, a c^{5} {\left (\sqrt {c x + 1} - \sqrt {c x - 1}\right )}^{14} + 4 \, b c^{3} {\left (\sqrt {c x + 1} - \sqrt {c x - 1}\right )}^{14} + 44 \, a c^{5} {\left (\sqrt {c x + 1} - \sqrt {c x - 1}\right )}^{10} + 16 \, b c^{3} {\left (\sqrt {c x + 1} - \sqrt {c x - 1}\right )}^{10} - 176 \, a c^{5} {\left (\sqrt {c x + 1} - \sqrt {c x - 1}\right )}^{6} - 64 \, b c^{3} {\left (\sqrt {c x + 1} - \sqrt {c x - 1}\right )}^{6} - 192 \, a c^{5} {\left (\sqrt {c x + 1} - \sqrt {c x - 1}\right )}^{2} - 256 \, b c^{3} {\left (\sqrt {c x + 1} - \sqrt {c x - 1}\right )}^{2}\right )}}{{\left ({\left (\sqrt {c x + 1} - \sqrt {c x - 1}\right )}^{4} + 4\right )}^{4}}}{4 \, c} \]

[In]

integrate((b*x^2+a)/x^5/(c*x-1)^(1/2)/(c*x+1)^(1/2),x, algorithm="giac")

[Out]

-1/4*((3*a*c^5 + 4*b*c^3)*arctan(1/2*(sqrt(c*x + 1) - sqrt(c*x - 1))^2) + 2*(3*a*c^5*(sqrt(c*x + 1) - sqrt(c*x
 - 1))^14 + 4*b*c^3*(sqrt(c*x + 1) - sqrt(c*x - 1))^14 + 44*a*c^5*(sqrt(c*x + 1) - sqrt(c*x - 1))^10 + 16*b*c^
3*(sqrt(c*x + 1) - sqrt(c*x - 1))^10 - 176*a*c^5*(sqrt(c*x + 1) - sqrt(c*x - 1))^6 - 64*b*c^3*(sqrt(c*x + 1) -
 sqrt(c*x - 1))^6 - 192*a*c^5*(sqrt(c*x + 1) - sqrt(c*x - 1))^2 - 256*b*c^3*(sqrt(c*x + 1) - sqrt(c*x - 1))^2)
/((sqrt(c*x + 1) - sqrt(c*x - 1))^4 + 4)^4)/c

Mupad [B] (verification not implemented)

Time = 31.05 (sec) , antiderivative size = 650, normalized size of antiderivative = 6.57 \[ \int \frac {a+b x^2}{x^5 \sqrt {-1+c x} \sqrt {1+c x}} \, dx=\frac {\frac {b\,c^2\,1{}\mathrm {i}}{32}+\frac {b\,c^2\,{\left (\sqrt {c\,x-1}-\mathrm {i}\right )}^2\,1{}\mathrm {i}}{16\,{\left (\sqrt {c\,x+1}-1\right )}^2}-\frac {b\,c^2\,{\left (\sqrt {c\,x-1}-\mathrm {i}\right )}^4\,15{}\mathrm {i}}{32\,{\left (\sqrt {c\,x+1}-1\right )}^4}}{\frac {{\left (\sqrt {c\,x-1}-\mathrm {i}\right )}^2}{{\left (\sqrt {c\,x+1}-1\right )}^2}+\frac {2\,{\left (\sqrt {c\,x-1}-\mathrm {i}\right )}^4}{{\left (\sqrt {c\,x+1}-1\right )}^4}+\frac {{\left (\sqrt {c\,x-1}-\mathrm {i}\right )}^6}{{\left (\sqrt {c\,x+1}-1\right )}^6}}-\frac {\frac {a\,c^4\,1{}\mathrm {i}}{1024}-\frac {a\,c^4\,{\left (\sqrt {c\,x-1}-\mathrm {i}\right )}^2\,3{}\mathrm {i}}{128\,{\left (\sqrt {c\,x+1}-1\right )}^2}-\frac {a\,c^4\,{\left (\sqrt {c\,x-1}-\mathrm {i}\right )}^4\,53{}\mathrm {i}}{512\,{\left (\sqrt {c\,x+1}-1\right )}^4}+\frac {a\,c^4\,{\left (\sqrt {c\,x-1}-\mathrm {i}\right )}^6\,87{}\mathrm {i}}{256\,{\left (\sqrt {c\,x+1}-1\right )}^6}+\frac {a\,c^4\,{\left (\sqrt {c\,x-1}-\mathrm {i}\right )}^8\,657{}\mathrm {i}}{1024\,{\left (\sqrt {c\,x+1}-1\right )}^8}+\frac {a\,c^4\,{\left (\sqrt {c\,x-1}-\mathrm {i}\right )}^{10}\,121{}\mathrm {i}}{256\,{\left (\sqrt {c\,x+1}-1\right )}^{10}}}{\frac {{\left (\sqrt {c\,x-1}-\mathrm {i}\right )}^4}{{\left (\sqrt {c\,x+1}-1\right )}^4}+\frac {4\,{\left (\sqrt {c\,x-1}-\mathrm {i}\right )}^6}{{\left (\sqrt {c\,x+1}-1\right )}^6}+\frac {6\,{\left (\sqrt {c\,x-1}-\mathrm {i}\right )}^8}{{\left (\sqrt {c\,x+1}-1\right )}^8}+\frac {4\,{\left (\sqrt {c\,x-1}-\mathrm {i}\right )}^{10}}{{\left (\sqrt {c\,x+1}-1\right )}^{10}}+\frac {{\left (\sqrt {c\,x-1}-\mathrm {i}\right )}^{12}}{{\left (\sqrt {c\,x+1}-1\right )}^{12}}}-\frac {a\,c^4\,\ln \left (\frac {{\left (\sqrt {c\,x-1}-\mathrm {i}\right )}^2}{{\left (\sqrt {c\,x+1}-1\right )}^2}+1\right )\,3{}\mathrm {i}}{8}-\frac {b\,c^2\,\ln \left (\frac {{\left (\sqrt {c\,x-1}-\mathrm {i}\right )}^2}{{\left (\sqrt {c\,x+1}-1\right )}^2}+1\right )\,1{}\mathrm {i}}{2}+\frac {a\,c^4\,\ln \left (\frac {\sqrt {c\,x-1}-\mathrm {i}}{\sqrt {c\,x+1}-1}\right )\,3{}\mathrm {i}}{8}+\frac {b\,c^2\,\ln \left (\frac {\sqrt {c\,x-1}-\mathrm {i}}{\sqrt {c\,x+1}-1}\right )\,1{}\mathrm {i}}{2}+\frac {a\,c^4\,{\left (\sqrt {c\,x-1}-\mathrm {i}\right )}^2\,7{}\mathrm {i}}{256\,{\left (\sqrt {c\,x+1}-1\right )}^2}-\frac {a\,c^4\,{\left (\sqrt {c\,x-1}-\mathrm {i}\right )}^4\,1{}\mathrm {i}}{1024\,{\left (\sqrt {c\,x+1}-1\right )}^4}+\frac {b\,c^2\,{\left (\sqrt {c\,x-1}-\mathrm {i}\right )}^2\,1{}\mathrm {i}}{32\,{\left (\sqrt {c\,x+1}-1\right )}^2} \]

[In]

int((a + b*x^2)/(x^5*(c*x - 1)^(1/2)*(c*x + 1)^(1/2)),x)

[Out]

((b*c^2*1i)/32 + (b*c^2*((c*x - 1)^(1/2) - 1i)^2*1i)/(16*((c*x + 1)^(1/2) - 1)^2) - (b*c^2*((c*x - 1)^(1/2) -
1i)^4*15i)/(32*((c*x + 1)^(1/2) - 1)^4))/(((c*x - 1)^(1/2) - 1i)^2/((c*x + 1)^(1/2) - 1)^2 + (2*((c*x - 1)^(1/
2) - 1i)^4)/((c*x + 1)^(1/2) - 1)^4 + ((c*x - 1)^(1/2) - 1i)^6/((c*x + 1)^(1/2) - 1)^6) - ((a*c^4*1i)/1024 - (
a*c^4*((c*x - 1)^(1/2) - 1i)^2*3i)/(128*((c*x + 1)^(1/2) - 1)^2) - (a*c^4*((c*x - 1)^(1/2) - 1i)^4*53i)/(512*(
(c*x + 1)^(1/2) - 1)^4) + (a*c^4*((c*x - 1)^(1/2) - 1i)^6*87i)/(256*((c*x + 1)^(1/2) - 1)^6) + (a*c^4*((c*x -
1)^(1/2) - 1i)^8*657i)/(1024*((c*x + 1)^(1/2) - 1)^8) + (a*c^4*((c*x - 1)^(1/2) - 1i)^10*121i)/(256*((c*x + 1)
^(1/2) - 1)^10))/(((c*x - 1)^(1/2) - 1i)^4/((c*x + 1)^(1/2) - 1)^4 + (4*((c*x - 1)^(1/2) - 1i)^6)/((c*x + 1)^(
1/2) - 1)^6 + (6*((c*x - 1)^(1/2) - 1i)^8)/((c*x + 1)^(1/2) - 1)^8 + (4*((c*x - 1)^(1/2) - 1i)^10)/((c*x + 1)^
(1/2) - 1)^10 + ((c*x - 1)^(1/2) - 1i)^12/((c*x + 1)^(1/2) - 1)^12) - (a*c^4*log(((c*x - 1)^(1/2) - 1i)^2/((c*
x + 1)^(1/2) - 1)^2 + 1)*3i)/8 - (b*c^2*log(((c*x - 1)^(1/2) - 1i)^2/((c*x + 1)^(1/2) - 1)^2 + 1)*1i)/2 + (a*c
^4*log(((c*x - 1)^(1/2) - 1i)/((c*x + 1)^(1/2) - 1))*3i)/8 + (b*c^2*log(((c*x - 1)^(1/2) - 1i)/((c*x + 1)^(1/2
) - 1))*1i)/2 + (a*c^4*((c*x - 1)^(1/2) - 1i)^2*7i)/(256*((c*x + 1)^(1/2) - 1)^2) - (a*c^4*((c*x - 1)^(1/2) -
1i)^4*1i)/(1024*((c*x + 1)^(1/2) - 1)^4) + (b*c^2*((c*x - 1)^(1/2) - 1i)^2*1i)/(32*((c*x + 1)^(1/2) - 1)^2)